function save_info(p_fuseaction){
	if (verify(document.forms(0))){
		document.forms(0).fuseaction.value = p_fuseaction;
	} else {
		return;
	}
	document.forms(0).hdn_fisrt.value = eval(document.forms(0).hdn_fisrt.value) + 1;

	btn_save_onclick(p_fuseaction);
}

function check(browser){
	document.forms[0].hnd_status.value=browser;
}
function Update_record_status(p_fuseaction){
	if (document.forms[0].hnd_status.value == '')
		alert('Phải xác định kết quả thụ lý.');
	else{
		document.forms(0).fuseaction.value = p_fuseaction;
		document.forms(0).submit();
	}
}
function btn_query_onclick(){
	v_current_url = "index.php";
	v_record_id = document.forms(0).hdn_record_id.value;
	v_fuseaction = document.forms(0).fuseaction.value;
	v_recordtype_filter = document.forms(0).hdn_recordtype_filter.value;
	v_current_url = v_current_url + "?fuseaction=" + v_fuseaction + "&hdn_record_id=" + v_record_id + "&hdn_recordtype_filter=" + v_recordtype_filter + "&hdn_query_data=1"
	//alert (v_current_url); 
	window.location = v_current_url;
}
function sending_email(p_fuseaction){
		document.forms(0).fuseaction.value = p_fuseaction;
		document.forms(0).submit();
}

function btn_result_update_onclick(p_fuseaction, p_checkbox_obj, p_hdn_item){
	var list = checkbox_value_to_list(p_checkbox_obj,",");
	if (list) {   //Kiem tra xem co cau hoi nao duoc chon hay khong?
		if(list_count_element(list,",")==1)	{ //Kiem tra xem co phai chon 1 cau hoi hay khong?
			p_hdn_item.value = list;
			document.forms(0).fuseaction.value = p_fuseaction;
			document.forms(0).submit();
		}else{
			alert("Bạn chỉ được chọn một hồ sơ để trả kết quả.");
		}
	} else {
		alert("Chưa có hồ sơ nào được chọn.");
		return;		
	}	
}